<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>LinkExchanger ADMIN AREA</title>
</head>
<body>

<?php
include_once '../global-includes.php';
include_once "menu.php";
echo "<body bgcolor=$bgcolor>";
$marker = time();
$condition = "check_next<$marker";
$qnt = BaseDbService::get_count('base', $condition);	
$scrol = Scrollers::scroller ($_GET['page'],$qnt,$onpage,$page_rng,$cat_id);
?>


<center>
	<table cellpadding=2 cellspacing=1 width=1000 border=0>
		<tr>
			<td colspan=6 align=center>
				<font face="Verdana, Arial" size="4" color="green">
					<b>Результати перевірки посилань</b>
				</font>
				<hr size=1>
			</td>
		</tr>

<!-- display the pages count  -->  
		<tr>
			<td colspan=6>
				<?php echo $messages->getMessage('directory.general.total') . ":  $qnt || $scrol "?>
				<hr size=1>
			</td>
		</tr>

<!-- display the cap  of table  -->
		<tr>
			<td align=center>
				<font face="Verdana, Arial" size="2" color="black">
					<b>ID</b>
				</font>
			</td>
			<td align=center>
				<font face="Verdana, Arial" size="2" color="black">
					<b>Нік</b>
				</font>
			</td>
			<td align=center>
				<font face="Verdana, Arial" size="2" color="black">
					<b>E-mail</b>
				</font>
			</td>
			<td align=center>	
				<font face="Verdana, Arial" size="2" color="black">
					<b>Категорія</b>
				</font>
			</td>
			<td align=center>
				<font face="Verdana, Arial" size="2" color="black">
					<b>Ми на сайті</b>
				</font>
			</td>
			<td align=center>
				<font face="Verdana, Arial" size="2" color="black">
					<b>Наступна перевірка</b>
				</font>
			</td>
		</tr>
		<tr>
			<td colspan=6>
				<hr size=1>
			</td>
		</tr>
		
<?php 
$fst_item = (Scrollers::$page_cur - 1) * $onpage;	
$sql = "SELECT id, nick, mail, category, urllink, check_result, check_next, check_date, date_create FROM base WHERE check_next<$marker LIMIT $fst_item,$onpage";
$record=BaseDbService::execute_select_query($sql);

for ($i=0;$i<count($record);$i++){
	
$now = OnSite::time_on_site($record[$i][date_create]);
$check_next = date("Y-m-d H:i:s",$record[$i][check_next]);
$fc = ($record[$i][check_result] == NO) ? $wrn_color : $font_color;

echo "<tr>
<td align=center><font face=$font_face size=$font_size color=$fc>".$record[$i][id]."</font></td>
<td align=center><font face=$font_face size=$font_size color=$fc>".$record[$i][nick]."</font></td>
<td align=center><font face=$font_face size=$font_size color=$fc>".$record[$i][mail]."</font></td>
<td align=center><font face=$font_face size=$font_size color=$fc>".$record[$i][category]."</font></td>
<td align=center><font face=$font_face size=$font_size color=$fc>$now</font></td>
<td align=center><font face=$font_face size=$$font_size color=$fc>".$check_next."</font></td></tr>
<tr><td align=right><br><font face=$font_face size=$font_size color=$fc><b>Посилання : </b></font></td>
<td align=left colspan=3><br><font face=$font_face size=$font_size color=$fc><a href=".$record[$i][urllink].">".$record[$i][urllink]."</a></font></td>
<td align=right colspan=2><br><font face=$font_face color=$font_color size=$font_size><a href=multicheck.php?id=".$record[$i][id].">Перевірити</a></font></td>
<tr><td colspan=6><hr size=1></td></tr>";
}
?>

	</table>
</center>

</body>
</html>